1. Field of the Invention
The present invention relates to image processing, and more particularly, to a method and apparatus for pre-processing images in wide dynamic range (WDR) image processing and a method and apparatus for WDR image processing using the pre-processing method and apparatus.
2. Description of the Related Art
When photographing an image that includes both bright regions and dark regions due to great differences in the illumination intensity of the photographing scene, an image clearly showing both the bright and dark regions cannot be obtained even when the exposure time and the aperture are properly adjusted. Thus, in this case, a wide dynamic range (WDR) function is used so that an image for which the exposure is adjusted so as to clearly show the bright regions and an image for which the exposure is adjusted so as to clearly show the dark regions are fused. Accordingly, an image in which both the bright and dark regions are clearly shown can be obtained.
Various image photographing devices such as security cameras, digital cameras, broadcasting filming apparatus, cameras for automobiles, mobile cameras, etc. have a WDR function. When the WDR function is used, a clear image can be photographed in cases when, for example, a picture is taken indoors when backlight exists, during night photography when both bright regions and dark regions are present, when photographing a sports scene where bright regions due to sunlight and dark regions due to shadows are mixed, etc.
In general, to realize a WDR function, a block unit fusion method or a pixel unit fusion method is used.
In the block unit fusion method, image fusion units are set as blocks, and fusion rates are set differently for each block. The speed of the block unit fusion method is higher than that of the pixel unit fusion method, but since the blocks are fused by different fusing processes from one another, differences are generated in the luminance between the blocks, and thus an anti-blocking process is essentially required to solve this problem. Also, according to the blocks, an image with a predetermined portion having different brightness from other portions may be output.
In the pixel unit fusion method, one image fusing unit is set as one pixel and is fused corresponding to the pixel. Examples of the pixel unit fusion method include pixel unit fusion using a weight-sum in the spatial domain, and pixel unit fusion using the gradient domain. In the pixel unit fusion method using a weight-sum, weights are set differently for each of the pixels. Details of this method are disclosed in U.S. Pat. No. 6,501,504, titled “Dynamic Range Enhancement for Imaging Sensors” to H. John Tatko, and in U.S. Pat. No. 6,825,884, titled “Imaging Processing Apparatus for Generating a Wide Dynamic Range Image” to Kazuhito Horiuchi. In the pixel unit fusion method using the gradient domain, an input image having a long exposure time and an input image having a short exposure time are converted into the gradient domain, thereby adjusting the sizes of gradients and determining the fusion ratios for each of the pixels units. This method has great performance, but due to the large amount of calculation, it cannot be applied to image devices for real-time processing. Details of this method are disclosed by R. Fattal et al. in “Gradient Domain High Dynamic Range Compression”, Proceedings of the 29th annual conference on Computer graphics and Interactive Techniques, pp. 249-256, 2002.
In the above-described conventional WDR methods, when an image is photographed without determining the optimal values of the exposure time of each of two different input images having different exposure times according to the respective scenes, imbalance in the image luminance is caused, which leads to low image quality. Also, since the illumination intensity is different for the bright and dark regions depending on the photographed scenes, the proper exposure time for each of the scenes should be accurately determined. Nevertheless, there is a need for a technology to obtain an optimal fusion result even when the proper exposure time is not detected.
Also, since an exposure time for receiving one input image is divided to receive two different input images having different exposure times, the range of adjusting the exposure time is limited. In particular, in the case of an image having a long exposure time, a fixed exposure time needs to be used to minimize color rolling caused by the light emitting period of phosphor light. In addition, in the case of an image having a short exposure time, the range of adjusting the exposure time is greatly limited.